<html>  
    <head>  
        <meta name="layout" content="main">  
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    
        <script src="js/html2canvas.js" type="text/javascript"></script>
        <script src="js/jquery-1.8.3.min.js" type="text/javascript"></script>  
        <script  type="text/javascript" >
            function qqqq() {
                html2canvas($("#content"), {
                    onrendered: function (canvas) {
                        document.body.appendChild(canvas);
                    }
                });
            }
           
        </script>  
    </head>  
    <body>  
     <div id=content style="width:150px;height:150px;border:1px lightblue solid">
    <span>Hello world</span>
    <br>
    <span><h2>Are you hear me?!</h2></span>
</div>
<button onclick="qqqq()">qqq</button>
    </body>  
</html> 